A Language for Bi-Directional Tree Transformations

نویسندگان

  • Michael B. Greenwald
  • Jonathan T. Moore
  • Benjamin C. Pierce
  • Alan Schmitt
چکیده

We present a semantic foundation and a collection of program combinators for bi-directional transformations on tree-structured data. In one direction, these transformations map a “concrete” tree into a simplified “abstract” one; in the other, they map a modified abstract tree, together with the original concrete tree, to a correspondingly modified concrete tree. The challenge of understanding and designing these transformations—called lenses—arises from their asymmetric nature: information is discarded when mapping from concrete to abstract, and must be restored on the way back. We identify a natural mathematical space of well-behaved lenses, in which the two components are constrained to fit together in a sensible way. We study definedness and continuity in this setting and state a precise connection with the classical theory of “update translation under a constant complement” from databases. We then instantiate our semantic framework in the form of a collection of lens combinators that can be assembled to describe powerful transformations on trees and whose well-behavedness follows from simple, local checks. These combinators include familiar constructs from functional programming (composition, mapping, projection, recursion) together with some novel primitives for manipulating trees (splitting, pruning, pivoting, etc.). An extended example shows how our combinators can be used to define a lens that translates between a native HTML representation of browser bookmarks and a generic abstract bookmark format.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Language for Bi-Directional Tree Transformations (Working Draft of Full Version)

We develop a semantic foundation and a core programming language for bi-directional transformations on tree-stuctured data. In one direction, these transformations, called lenses, map a complex “concrete” tree into a simplified “abstract” one; in the other, they map a modified abstract tree, together with the original concrete tree, to a correspondingly modified concrete tree. The challenge of ...

متن کامل

MATHEMATICAL ENGINEERING TECHNICAL REPORTS A Compositional Approach to Bidirectional Model Transformation

Model-driven architecture is a discipline in software engineering that aims to develop, maintain and evolve software by performing model transformations. Many attempts have been made on introducing bidirectionality to model transformation to enable better consistency and traceability between different models. However, the existing approaches are ad-hoc without clear updating semantics, hardly s...

متن کامل

Two optimal algorithms for finding bi-directional shortest path design problem in a block layout

In this paper, Shortest Path Design Problem (SPDP) in which the path is incident to all cells is considered. The bi-directional path is one of the known types of configuration of networks for Automated Guided Vehi-cles (AGV).To solve this problem, two algorithms are developed. For each algorithm an Integer Linear Pro-gramming (ILP) is determined. The objective functions of both algorithms are t...

متن کامل

Towards Rigorously Faking Bidirectional Model Transformations

Bidirectional model transformations (bx) are mechanisms for automatically restoring consistency between multiple concurrently modified models. They are, however, challenging to implement; many model transformation languages not supporting them at all. In this paper, we propose an approach for automatically obtaining the consistency guarantees of bx without the complexities of a bx language. Fir...

متن کامل

Distributed and Cooperative Compressive Sensing Recovery Algorithm for Wireless Sensor Networks with Bi-directional Incremental Topology

Recently, the problem of compressive sensing (CS) has attracted lots of attention in the area of signal processing. So, much of the research in this field is being carried out in this issue. One of the applications where CS could be used is wireless sensor networks (WSNs). The structure of WSNs consists of many low power wireless sensors. This requires that any improved algorithm for this appli...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003